package com.lex.crossgate.admin.common.base;

import com.lex.crossgate.admin.common.utils.ShiroUtils;
import com.lex.crossgate.admin.modules.sys.entity.SysUser;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 
 * <pre>
 * </pre>
 * 
 * <small> 2018年2月25日 | Aron</small>
 */
public abstract class BaseController {

    public SysUser getUser() {
        return ShiroUtils.getUserEntity();
    }

    public String getUserId() {
        return getUser().getUserId();
    }

    public static Subject getSubjct() {

        return SecurityUtils.getSubject();
    }

    public String getUserName() {
        return getUser().getUserName();
    }

}